import { API_POSTS_LIST } from '../api';
const state = {
    postsList: []
};
const mutations = {
    GET_POSTS_LIST(state, val) {
        console.log(state);
        state.postsList = val;
    }
};
const actions = {
    get_posts_list({commit}) {
        this.whaleXHR.GET(API_POSTS_LIST).then(res => {
            if (res.code === 'success') {
                commit('GET_POSTS_LIST', res.data);
            }
        });
    }
};
const getters = {};

export default {
    namespaced: true,
    state,
    mutations,
    actions,
    getters
};
